WTDSale Contract

The WTDSale contract manages the WTD token sale across three investment rounds: Seed, Private, and Public. Each round has its own pricing, allocation limit, and can be independently activated or deactivated by the admin.

Key Features

  • Three rounds — Seed, Private, and Public with separate pricing and allocations

  • Three payment methods — USDC, USDT, and ETH

  • Automatic vesting — Every purchase automatically creates a vesting schedule in WTDVesting

  • No time limits — Rounds are manually activated/deactivated by admin, not time-based

  • No per-user limits — Only total round allocation limits apply

  • One-time configuration — Each round can only be configured once (prices and allocation are immutable after setup)

  • Chainlink oracle — ETH purchases use a live ETH/USD price feed with a 1-hour staleness check

circle-exclamation

Payment Methods

Method
Token
Decimals
Price Feed

USDC

Circle USD Coin

6

Direct (configured price)

USDT

Tether USD

6

Direct (configured price)

ETH

Native ETH

18

Chainlink ETH/USD oracle

circle-info

ETH purchases rely on the Chainlink ETH/USD price feed. The contract enforces a 1-hour staleness check on the oracle price.

How It Works

1

Admin configures round

Admin configures each round with pricing and allocation.

2

Admin activates round

Admin activates a round when ready to accept purchases.

3

Buyer purchases

Buyers call purchaseWithUSDC, purchaseWithUSDT, or purchaseWithETH.

4

Payment collection

Payment is collected by the sale contract.

5

Vesting schedule

A vesting schedule is automatically created for the buyer in WTDVesting.

6

Withdrawals

Admin can withdraw collected funds per round to designated recipients.

Round Lifecycle

1

Not Configured

Initial state before any admin configuration.

2

Configured (one-time)

Admin configures prices and allocation. This configuration is immutable for the round.

3

Active

Sales are open and purchases are accepted.

4

Deactivated

Sales are closed. Admin can reactivate the round later.